package org.pim.smart.utils;

import java.util.Hashtable;

public class PropertiesCache {
	private final Hashtable<String, AbstractProperties> props = new Hashtable<String, AbstractProperties>();
	private static PropertiesCache INSTANCE = new PropertiesCache();
	
	private PropertiesCache(){}
	
	public static PropertiesCache getINSTANCE(){
		return INSTANCE;
	}
	
	public  AbstractProperties getProperties(String name){
		return (AbstractProperties)props.get(name);
	}
	
	public  AbstractProperties addProperties(String name, AbstractProperties prop)
    {
        props.put(name, prop);
        return getProperties(name);
    }

    public void remove(String name)
    {
        props.remove(name);
    }
}
